package com.sc.nft.entity.dto;

import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
@Data
public class SpecialEventManagementEditDTO {
    @ApiModelProperty("唯一id")
    @NotNull(message = "唯一id不能为空")
    private Long id;

    @ApiModelProperty(value = "专场名称")
    private String eventTitle;

    @ApiModelProperty(value = "排序")
    private Integer rank;

    @ApiModelProperty(value = "封面")
    private String cover;


    public Boolean authentication(){
        // 如果id存在数据,则其他三个字段至少有一个不能为空
        if (id != null) {
            if (StrUtil.isNotBlank(eventTitle) || rank != null || StrUtil.isNotBlank(cover)) {
                return true;
            }
        }
        return false;
    }
}
